The tax provided for in this chapter and any interest or penalties thereon is a specific lien upon each parcel of real property located in this state that is either sold or that is owned by an entity in which a controlling interest has been transferred or acquired. The lien attaches from the time of sale until the tax is paid, which lien may be enforced in the manner prescribed for the foreclosure of mortgages.