UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'um7CWn6KYmsRKNjfU7fD9gB1q76jrYOJo8yxK4OB06M=' 
WHERE 
  key_id = 'e731dd62a6fcdde4381c2c93dedc2a04be69fc2b9e084aaeae77bfb5749614e3' 
  AND (
    token = 'um7CWn6KYmsRKNjfU7fD9gB1q76jrYOJo8yxK4OB06M=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029