When the property is sold, enough of the proceeds to satisfy the lien and the costs of the foreclosure shall be paid to the state. The surplus, if any, shall be paid to the owner of the property, if known, or if he is not known, shall be paid into the court in which the lien was foreclosed for the use of the owner when he is ascertained.
(Added by Stats. 1965, Ch. 1144.)