Section 96A. So much of any funds as represent monies belonging to, or deposited for the benefit of, inmates who have died or have been discharged or have escaped from any correctional institution of the commonwealth, which shall have remained unclaimed for more than two years, shall be paid by the superintendent of such institution to the state treasurer to be held subject to be paid to the person establishing a lawful right thereto. After six years from the date when any such monies were paid to the state treasurer the same or any balance thereof then remaining in his hands may be used as a part of the ordinary revenue of the commonwealth. Any person may, however, establish his claim after the expiration of the six years above mentioned, and any claim so established shall be paid from the ordinary revenue of the commonwealth. Any person claiming a right to money deposited with the state treasurer under this section may establish the same by a petition to the probate court; provided, that in cases where claims amount to less than fifty dollars, the claims may be presented to the comptroller, who shall examine the same and allow and certify for payment such as may be proved to his satisfaction.