There is hereby levied and shall be paid and collected as herein set forth a documentary or transfer tax, to be known as the mineral documentary tax, upon the filing and recording of every lease and other writing hereafter executed whereby there is created a leasehold interest in and to any nonproducing oil, gas or other minerals in, on or under or that may be produced from any lands situated within the State of Alabama, or whereby any such interest is assigned or is extended beyond the primary term fixed by the original instrument, and upon every deed, instrument, transfer, evidence of sale or other writing whereby there is hereafter conveyed to a grantee or purchaser, or excepted or reserved to a grantor separately and apart from the surface, any interest in or right to receive royalty from any nonproducing oil, gas or other minerals in, on or under or that may be produced from any lands within the State of Alabama; provided, that the tax shall not apply to any mortgage or instrument creating a lien upon such interest, nor to the sale under foreclosure thereof.