UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/UbYeL10qixFPkOFCJ/FO9IFgBCQ6DCuk31oXrAq91I=' 
WHERE 
  key_id = '85c5e18d5732b7714160453be0557984ab4f03e570f23ade7c41f687a7ad7f70' 
  AND (
    token = '/UbYeL10qixFPkOFCJ/FO9IFgBCQ6DCuk31oXrAq91I=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00017