50 USC 2056 - Eligibility for annuity

(a) One-out-of-two requirement 
A participant must complete, within the last two years before any separation from service (except a separation because of death or disability) at least one year of creditable civilian service during which the participant is subject to this subchapter and in a pay status before the participant or the participants survivors are eligible for an annuity under this subchapter based on that separation.
(b) Refund of contributions for time not allowed for credit 
If a participant (other than a participant separated from the service because of death or disability) fails to meet the service and pay status requirement of subsection (a) of this section, any amounts deducted from the participants pay during the period for which no eligibility is established based on the separation shall be returned to the participant on the separation.
(c) Exception 
Failure to meet the service and pay status requirement of subsection (a) of this section shall not deprive the participant or the participants survivors of any annuity to which they may be entitled under this subchapter based on a previous separation.