Section 178C. Whenever any officer or employee or former officer or employee of a political subdivision of the commonwealth other than a county, city or town, dies, and such subdivision owes his estate any sum or sums by reason of the terms of his employment, the aggregate amount of which does not exceed five hundred dollars, and neither a duly appointed executor or administrator nor a voluntary administrator has made written demand for payment upon the treasurer of such subdivision, and such treasurer does not otherwise have actual notice that proceedings relative to the formal or informal settlement of such estate have been commenced in any probate court, such sum or sums may, in the discretion of such treasurer, be paid after the expiration of one month from the death of such officer or employee to the husband, widow or next of kin of such officer or employee. Payments made as provided in this section shall discharge all liability of the subdivision to all persons with respect to such sum or sums.