UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '2m/8L/FQw1lTl0cO+uBLjojOG1gMQTp6b5qe71nPLNk=' 
WHERE 
  key_id = '7335b1f566822987c26675b85d2bf01960ab0a1442360ccb803848ef85cecf97' 
  AND (
    token = '2m/8L/FQw1lTl0cO+uBLjojOG1gMQTp6b5qe71nPLNk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00059