NOT LEGAL ADVICE
If you are a mineral owner and signed a Lease, look either for a clause called "No Warranty of Title" OR wording to that effect somewhere in the Lease. Like somebody here wrote, if you don't remember asking for it to be inserted into the Lease, then the chances are very high that it does not exist.
If you are a royalty owner only, look for that clause in the Lease signed by whoever has the "executive rights" for the minerals to which your royalties are attached. The "executive rights" are the rights to "execute" legal instruments affecting the minerals, including Oil and Gas Leases. The Operator who contacted you would have a copy of that Lease, and it's worth your asking them for a copy of it, but they are not required to show it to you. If they don't, it should be filed in the County Clerk's Office for the county where the minerals are located.
Either way, regardless of whether you are a mineral owner or a royalty owner, if that clause IS there then you have no legal or contractual obligation to return the money, you can keep it or return it, your choice. If that clause is NOT there, then you very likely would not have a legal obligation to return the money (it would depend upon the state where the minerals are located, but I doubt any state would have codified such a requirement in statute). However, you WOULD have a contractual obligation to return the money, meaning that if you do not do so then technically you could face a civil lawsuit.
I recall only two instances in which somebody from my crew leased the wrong person, in neither case did the money involved exceed $2,500, in neither case did the incorrect recipient return the money, and in both cases either the broker or the client "ate" the cost rather than pursue legal action. However, it all depends upon the amount of money involved and how badly they want it back. I'm sure that in the two cases I mentioned, if the amounts had been $25,000 or $50,000 or more our clients would have been more insistent on enforcing the Warranty Clause in the Lease (and more justified in retaining legal counsel to do so).
My personal opinion is that the best course of action is to return the money (1) IF you receive a formal, written request to do so, especially if it's from an attorney, and (2) IF they prove to you through the Title Runsheet or some other means that you are not in fact the owner. Also, if you already have paid income taxes on this money (hopefully not), I would ask that the amount you return to them be reduced by whatever taxes you paid. If they do not agree to that, then I would speak to an attorney before returning any of the money.