UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'qMJM3Q0XRnK9+Vwx6+6wpPtpMiXfNvB+RHpmx6tVjhU=' 
WHERE 
  key_id = '6c486dd3c908eae5599c1a46dbceb74e56ceffbfe260ac2f5cb0db61d70b69d0' 
  AND (
    token = 'qMJM3Q0XRnK9+Vwx6+6wpPtpMiXfNvB+RHpmx6tVjhU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00043