On any such sale, the cost and expenses of the sale shall first be paid out of the proceeds. The balance thereof shall be applied, first, to the payment of tax claims, the oldest thereof having priority; municipal claims shall be paid next, the oldest in point of lien having priority; and any surplus shall be distributed in accordance with law.
72 P.S. § 5941.4