UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '9HH+fjCs4sjyl/SVEo69JI6d7nPPYUf2FRj1Bs8RZ3w=' 
WHERE 
  key_id = 'ea078a2a59e39b67507a687c39dc33e93cd9e7cfe7c293c0553f28721217a1c3' 
  AND (
    token = '9HH+fjCs4sjyl/SVEo69JI6d7nPPYUf2FRj1Bs8RZ3w=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034