Section 42. Deposits or shares standing in the individual name of a deceased depositor or shareholder shall, except as otherwise provided in this chapter, be paid to his legal representative; but if the total of the deposits and shares does not exceed $10,000 and there has been no demand for payment from a duly appointed executor or administrator, payment may be made at the discretion of the treasurer or other duly authorized officer of the corporation, after the expiration of 30 days from the death of the depositor or shareholder, to the surviving spouse of the deceased depositor or if there be no surviving spouse, to the next of kin of the deceased, upon presentation of a copy of the decedent's death certificate and the surrender of the passbook or other instrument, if any, evidencing the deposits or shares. Payments made as provided in this section shall discharge the liability of the corporation to all persons to the extent of such payments.