The rights, powers, and titles hereby recognized, confirmed, established, and vested in and assigned to the respective States and their grantees are subject to each lease executed by a State, or its grantee, which was in force and effect on June 5, 1950, in accordance with its terms and provisions and the laws of the State issuing, or whose grantee issued, such lease, and such rights, powers, and titles are further subject to the rights herein now granted to any person holding any such lease to continue to maintain the lease, and to conduct operations thereunder, in accordance with its provisions, for the full term thereof, and any extensions, renewals, or replacements authorized therein, or heretofore authorized by the laws of the State issuing, or whose grantee issued such lease: Provided, however, That, if oil or gas was not being produced from such lease on and before December 11, 1950, or if the primary term of such lease has expired since December 11, 1950, then for a term from May 22, 1953 equal to the term remaining unexpired on December 11, 1950, under the provisions of such lease or any extensions, renewals, or replacements authorized therein, or heretofore authorized by the laws of the State issuing, or whose grantee issued, such lease: Provided, however, That within ninety days from May 22, 1953 (i) the lessee shall pay to the State or its grantee issuing such lease all rents, royalties, and other sums payable between June 5, 1950, and May 22, 1953, under such lease and the laws of the State issuing or whose grantee issued such lease, except such rents, royalties, and other sums as have been paid to the State, its grantee, the Secretary of the Interior or the Secretary of the Navy or the Treasurer of the United States and not refunded to the lessee; and (ii) the lessee shall file with the Secretary of the Interior or the Secretary of the Navy and with the State issuing or whose grantee issued such lease, instruments consenting to the payment by the Secretary of the Interior or the Secretary of the Navy or the Treasurer of the United States to the State or its grantee issuing the lease, of all rents, royalties, and other payments under the control of the Secretary of the Interior or the Secretary of the Navy or the Treasurer of the United States or the United States which have been paid, under the lease, except such rentals, royalties, and other payments as have also been paid by the lessee to the State or its grantee;