The proceeds from a sale or grant of such lands shall be applied first to repay any expenditures made by the office of general services from moneys appropriated to said office in the first instance for the administration, management, utilization and disposal of real property of the state and any rights or interests therein and any balance of such moneys remaining after repayment of the first instance expenditures shall be applied to the cost of the improvement which renders such lands no longer necessary, and the expenses incurred by the attorney general for searches and examination of the title to such lands shall be deemed an item of the cost of improvement. Any surplus from the sale of abandoned lands above the cost of the entire improvement shall be applied to the sinking fund for the payment of the improvement bonds.
N.Y. Pub. Lands Law § 59-A