UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'OrWCXVuPIy1MzF14E2WG6/ZfabCf0fu6YHeh4ytRjeI=' 
WHERE 
  key_id = '06a5803e6aa633cee6e55d866a1cf6085029c7bd4cdf7d8cf4e76826bbd27fc8' 
  AND (
    token = 'OrWCXVuPIy1MzF14E2WG6/ZfabCf0fu6YHeh4ytRjeI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00057