UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '2zDom2TmGPl7nDfBMnuU2RBeWD3IJm0k3ZMBzi9akHA=' 
WHERE 
  key_id = 'f2e194686fd2c4848999980aa353ef62bff0f0a16346b182676d9d0cd6bfc8ae' 
  AND (
    token = '2zDom2TmGPl7nDfBMnuU2RBeWD3IJm0k3ZMBzi9akHA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027