UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '8yX248//7IHhxk3qEKIMfpDSpv6JREpVktx5JWEdsVs=' 
WHERE 
  key_id = 'e7cfaacd61d0f36485fee72e9db2e2250fee754acbbab2453cd2758ef5e734d4' 
  AND (
    token = '8yX248//7IHhxk3qEKIMfpDSpv6JREpVktx5JWEdsVs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00051