UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '57EO2//Iwg+ZyeG6XILutZfzqDOqOpJ12AQw9qhHhw4=' 
WHERE 
  key_id = '443fa155f5942dfbe4c4e663b96500c8e8cbb27044ab84403869bfb16bd65aac' 
  AND (
    token = '57EO2//Iwg+ZyeG6XILutZfzqDOqOpJ12AQw9qhHhw4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00061