UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'J1u+Z6YmU4vUcIhdVhPUWWaLaeONc2REaOjSzw7HZvY=' 
WHERE 
  key_id = 'b8f3f17ef25c82a932083410a5be9cf7942f3d5bb96a310e29f956f47aa0a06c' 
  AND (
    token = 'J1u+Z6YmU4vUcIhdVhPUWWaLaeONc2REaOjSzw7HZvY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00041