UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '7jfhyjTq7jJ7JihxdoA8+Xxw7ep2NpDPJWTwLt1hEIQ=' 
WHERE 
  key_id = '92eb57e6bf102e82132c02d098c0bde8260c8e3bc3638f1cac8674ccb719a026' 
  AND (
    token = '7jfhyjTq7jJ7JihxdoA8+Xxw7ep2NpDPJWTwLt1hEIQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00026