UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 's5Y8clsdl7BOGKd9AWCDPNfclcYv5NC6C6xsuWZzTL4=' 
WHERE 
  key_id = 'fdeebe58d9e9c9494f8fd5230be6e86c10d9017b5d6bf84248dbe54d52d89a06' 
  AND (
    token = 's5Y8clsdl7BOGKd9AWCDPNfclcYv5NC6C6xsuWZzTL4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00025