UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'RxGKHSY/7f74Q6cMKIHGQNHOfdbnxAwT/MrjbOta3c0=' 
WHERE 
  key_id = '23dcf2b8da82ea567fd915df275f756a76ade0dba4d28ceee792198f0d1e0a71' 
  AND (
    token = 'RxGKHSY/7f74Q6cMKIHGQNHOfdbnxAwT/MrjbOta3c0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00022