Any lien filed pursuant to this chapter shall have priority over any other lien upon or interest in the lands and premises upon which the razed or demolished building or structure was situated, even though such other lien was entered of record or such interest vested prior to the date of filing of the lien arising under this chapter, excepting any lien for taxes. In the case of sale under execution process of any premises upon which any lien for such public expenditures exists, the lien shall be transferred to the fund arising from the sale in the hands of the officer making the sale, and the premises so sold shall be discharged therefrom.