UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '0eKCjCGf0QJwwR/cEXtvWbE8BHcuW6HvuTHKdxL8Xvo=' 
WHERE 
  key_id = '26d4978bb95b0e6785a413aeced499082ab26dcc9da9327383be0226f72fb622' 
  AND (
    token = '0eKCjCGf0QJwwR/cEXtvWbE8BHcuW6HvuTHKdxL8Xvo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00043