On completion of a well producing gas or oil on any leased lands included under a unit operation agreement, royalties from the producing well shall be paid on all lands originally included within the unit operation agreement. Within six months after the completion of the producing well, the lands within the unit operation agreement not included as “in pool” acreage and on which no royalties are payable, shall be released, unless the owner of the lands has otherwise agreed in writing. This section does not extend to any leases and unit operation agreements in effect on June 1, 1956.