The lessee shall pay to the department the market value at the well of the state's royalty share of oil and other hydrocarbons except gas produced and saved and delivered by lessee from the lease. In lieu of receiving payment for the market value of the state's royalty share of oil, the department may elect that such royalty share of oil be delivered in kind at the mouth of the wells into tanks provided by the department. Lessee shall pay to the department the state's royalty share of the sale price received by the lessee for gas produced and saved and sold from the lease. If such gas is not sold but is used by lessee for the manufacture of gasoline or other products, lessee shall pay to the department the market value of the state's royalty share of the residue gas and other products, less a proper allowance for extraction costs.