UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '5s56DHAafNxv0f/XM17BeQcFFLJ9PmLvoHk3IFxPawA=' 
WHERE 
  key_id = 'c684cc568654f951d26bd5f94ccd5ae5735d2ed441b26dffde7af36ce7041727' 
  AND (
    token = '5s56DHAafNxv0f/XM17BeQcFFLJ9PmLvoHk3IFxPawA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00015