UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '8IHVgEC1pIuEBkm1hw5jGLGK3dXfNpbrNqbQjY+QVN8=' 
WHERE 
  key_id = '2f5c127d2d72ed630a65578249e05c515050335c24f1d9f526b27fbf4a0e9658' 
  AND (
    token = '8IHVgEC1pIuEBkm1hw5jGLGK3dXfNpbrNqbQjY+QVN8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00058