UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '3IK8qmm2JST8b0o9IB080DUXn16nyO706oeaq3Yh1lw=' 
WHERE 
  key_id = '61c14d3d1b0c735a4fc5409816ddcb4d8f58742551a25e6d0066164fa687d2ff' 
  AND (
    token = '3IK8qmm2JST8b0o9IB080DUXn16nyO706oeaq3Yh1lw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00025