UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '9xSpZqbpe4bLlO4lCNkZ3LJrp/WtTxxeUl8sp94raM0=' 
WHERE 
  key_id = '5faebeed909416b1f6d9133e071b995be69f06d385d46fa8dfbd9fbcc2f74412' 
  AND (
    token = '9xSpZqbpe4bLlO4lCNkZ3LJrp/WtTxxeUl8sp94raM0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00038