The Secretary may provide to a lessee a credit against royalties owed under this chapter, in an amount equal to the value of electricity provided under contract to a State or county government that is entitled to a portion of such royalties under section
1019 of this title, section 35 of the Mineral Leasing Act (
30 U.S.C.
191), except as otherwise provided by this section, or section
355 of this title, if—