UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'jtLTAk6HlKs01amlVCmPnGy3oeR3UwHm9XB/SCc/eHw=' 
WHERE 
  key_id = '2e48cecdbfeb2aea4f448d98fd718b5359a350f5c87c08b75c66ffebd5e88c0c' 
  AND (
    token = 'jtLTAk6HlKs01amlVCmPnGy3oeR3UwHm9XB/SCc/eHw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00019