Executive Summary
As yourself three questions:
- Did you intentionally lie to the company?
- Would the disclosure of this information have changed the outcome on the company's side?
- Will the disclosure of this information now change the outcome on the company's side?
If the answer is "no" to all three, you are probably making a mountain out of a molehill. I would advise disclosing information like this only when it clarifies your intent, impacts the result, and impacts the future relationship with the person.
Intent
If you were lying to the company as a negotiating tactic, bringing it up now would be folly. "Golly gee, I was being deceitful during negotiation, but I feel so bad I'll bring it up now!" So let's presume you didn't do this with intent to deceive.
So how will the company react if there was no ill intent and you bring it up?
"Thanks for letting us know samarasa. So you're saying you're incompetent and don't actually pay attention to things as significant as your current employment contract when negotiating? Are you sure you properly read the clauses on your rights to terminate your current contract, and your notice period?"
Nothing good will come of sharing this information -- it will look like you made a $10k mistake (you did), and in the worst case they will assume that it's a guilty conscience after using an ill-conceived negotiating tactic. Neither of these will set you off on the right foot with the new company.
Impact on the Original Outcome
So let's say you had said something different during the negotiation. Rather than, "I need an additional $10k to cover the payout at my prior company" you say "I need an additional $10k" with no conditions. Would this have changed the outcome of the negotiation?
To the company, the outcome is the same. They either think you are worth paying an extra $10k, or they don't. You already have the base $20k not being used for the payout, so even if they refused the additional $10k, you could just use a portion of your signing bonus to pay for it if needed. At the end of the day, $40k is $40k, regardless of how you use it.
Impact on the Future Outcome
What will disclosing this actually accomplish?
Do you really think the company will respect you more for trying to return $10k? Do you think that this will somehow significantly impact their financial stability?
Even if you do tell them they were wrong, it isn't like they are going to change the $40k to $30k, after already explaining to their bosses that they need budget for $40k signing bonus. "Hey boss, remember that guy I said we needed 40k to hire? Turns out we only need 30k because he doesn't know how to read employment contracts." Do you really think that's a conversation someone in hiring wants to have with their boss?
What if you actually had a contractual obligation to pay $20k to your current employer, but due to excellent negotiation skills were able to talk them down to $10k. Would you still bring that up with your new employer?
Use Common Sense
For many companies you can look up annual revenue and/or profit. If that information is available, take a look at it. Calculate what the ratio of profit would be with/without your $10k bonus for the latest available year. Will it really have an impact?
This is a one-off payment by the company. It's probably been accounted for in the budget, and will never be thought of again. It creates no future liabilities, and is a rather cheap investment if you end up panning out.
Rather than creating more work for people to run around dealing with what I'd consider an incredibly odd confession, focus on creating value for your new employer. Do a good job, and the $10k looks like peanuts.