All expenses and costs of dipping or treating cattle or sheep and all expenses and costs of gathering sheep or cattle which are incurred by the department pursuant to this chapter are a lien on the cattle or sheep until the lien is paid or foreclosed by law.