UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '5H6WeOH4o9UTRTlgGg1H8d5fJS7oaNIztNBohysOVVQ=' 
WHERE 
  key_id = '13504cf3d43ba5b787ccf944731c8c23bb9c85e1eb8cb516476433988afbbc9c' 
  AND (
    token = '5H6WeOH4o9UTRTlgGg1H8d5fJS7oaNIztNBohysOVVQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020