UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ytJJ8jVk4iDnO9s5pk/DJK0Mrj0iDYynOj6ifsPdj/o=' 
WHERE 
  key_id = '5671f1e6cbe6565dfed3a768638697075ec2bceae63f03565694dabee2737427' 
  AND (
    token = 'ytJJ8jVk4iDnO9s5pk/DJK0Mrj0iDYynOj6ifsPdj/o=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00021