UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'qp5ndlFPlQWq/qgAOgOnR0aC7G4SgeDM4i41sPRUCbM=' 
WHERE 
  key_id = 'bb2971fa3c78e7e0ffe59fc9605336d20db2c8a0c15019941e808ebcfbbde4f7' 
  AND (
    token = 'qp5ndlFPlQWq/qgAOgOnR0aC7G4SgeDM4i41sPRUCbM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00046