UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'fbcUx6DweipoV2YS1wFsIHz/RjuL00nTId880WCp96Y=' 
WHERE 
  key_id = 'af5e472610379a24b5078d7c8d79efbc6dcec8bf377b6682eab14912cfaba64c' 
  AND (
    token = 'fbcUx6DweipoV2YS1wFsIHz/RjuL00nTId880WCp96Y=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00038