If you notice an overpayment. Advise your HR department in writing, either a letter or an email, as soon as you can. Arrange for a meeting and invite them to explain the situation to reassure yourself that there has, or hasn't been an overpayment. Before the meeting you should check your employment contract and your employer's written policy, if they have one, with regard to overpayments.
If an overpayment is confirmed. If you and your employer agree that you have been overpaid, they do have the right to deduct the overpayment from your pay. But there is no law that states how much time your employer has to reclaim the overpayment. Even if your contract, or their written policy, advises that they will take the overpayment immediately, it's usually in your, and your employers', interest to agree to a schedule of payments, so it's always worth suggesting that.