UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'zthbidzfz0g4xOxAd2/DJhTm5imt+5FWmNMPAmEhrEA=' 
WHERE 
  key_id = '92f8403b53df5ddd71d36441d41909f1f79d48fe0a2cea4afd5242c8efaf8d08' 
  AND (
    token = 'zthbidzfz0g4xOxAd2/DJhTm5imt+5FWmNMPAmEhrEA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029