Notwithstanding Section 21453, an election of optional settlement 2 or 3, or optional settlement 4 involving life contingency in which a spouse is designated as the beneficiary, may be modified as provided in this section in the event of a dissolution or annulment of the marriage or a legal separation in which the division of the community property awards the total interest in the retirement system to the retired member. The modification shall provide that payment shall be continued during the retired person’s lifetime in accordance with the optional settlement then
in effect but that no monthly allowance shall be paid following the retired person’s death, and in lieu thereof there shall be paid in a lump sum to the member’s estate or a beneficiary designated by him or her the amount, if any, by which the member’s accumulated contributions at retirement exceed the total payments made to the retired person to the date of his or her death.