The governing body of each county shall begin deducting, upon July 19, 1979, and each month thereafter, from the salaries of such sheriffs an amount equal to six percent of the monthly salary paid such sheriff. Such sum shall be deducted monthly and paid into the general fund of the county. If any sheriff, subject to the provisions of this article, shall end his tenure of office prior to having reached age of 55 years, but having had 16 years of service as a law enforcement officer, 12 of which have been as sheriff, his supernumerary allowance as set out in Section 36-22-62, shall be vested and held in the general fund of the county until he attains the age of 55, at which time, or any time thereafter, he may elect to become a supernumerary sheriff as set out in Section 36-22-60. If any sheriff, subject to the provisions of this article, shall end his tenure of office prior to having had 16 years of service as a law enforcement officer, 12 of which was served as sheriff, as provided herein, an amount equal to the total paid by him into the general fund of the county under the provisions of this section, shall be repaid to him. In the event a sheriff should die in office prior to his eligibility, then, in that event, the total amount paid by him to the general fund of the county hereunder shall be paid to his named beneficiary. In the event a sheriff dies in office who immediately prior to his death was eligible for supernumerary status but had not elected to be commissioned as a supernumerary sheriff, then, in that event, his spouse shall be entitled to the same benefits as if he had elected to be commissioned as a supernumerary sheriff. In the event of the death of any supernumerary sheriff in whose favor a monthly retirement allowance is accruing, his spouse shall be entitled to a monthly allowance equal to 50 percentum of the retirement allowance the supernumerary sheriff was receiving when he died, as hereinafter specified, for a period of up to 15 years. No spouse shall receive any benefits under this article unless such spouse was married to the deceased sheriff or supernumerary sheriff at the time of his death and any benefits of a spouse under this article shall terminate in the event the spouse remarries. This section shall not apply in any county in which the sheriff of said county is eligible to become entitled to any other state or county retirement act, which he may elect to come under.