(1) Every person who has purchased or purchases any invalid tax title to any real property in this state shall, from the effective date of this part, have a lien against the property for the recovery of the amount of the purchase price paid to the county to the extent that the county would have a lien prior to the sale by the county, but in no event may the lien be greater than the amount of taxes, tax notice charges, interest, and penalties, or the amount actually paid, whichever is smaller.
(2) Taxes and tax notice charges paid by the purchaser for subsequent years after the purchase from the county shall be included in the amount secured by the lien which has not already been recovered.
(3) The lien shall have the same priority against the property as the lien for the delinquent taxes and tax notice charges which were liquidated by the purchase except that it may not have preference over any right, title, interest in, or lien against, the property acquired since the purchase of the tax title for value and without notice, and the lien shall bear interest at the legal rate for a period of not to exceed four years.
(4) The lien shall be foreclosed in any action in which the invalidity of the tax title is determined.
(5) If the lien is not foreclosed at the time of the determination of the invalidity of the tax title, any later action to foreclose the lien shall be barred.