UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'yTrSLOsI3kyrAx3y9F2Is1GoGLE5AZunqJkrLmGc/88=' 
WHERE 
  key_id = 'ae6a26cb1d2ffd236eeebe88cafde1032fd917916fcbb35e7cd489d7e35b746b' 
  AND (
    token = 'yTrSLOsI3kyrAx3y9F2Is1GoGLE5AZunqJkrLmGc/88=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00045