What’s the best thing to do when an email confirmation link expires?

When a user signs up for my web application, they need to click a link in an email to confirm their email address. This link is only valid for a certain number of days.

I've never had a link like this expire in other applications, just to try what would happen if I then tried to sign up again. Currently, the way this is handled in my application, is that the user nees to go through the "forgot password" flow to choose a password. The account has already been created, so registering with the same e-mail address won't work, but the user doesn't have a password yet, so they can't just log in.

What's the best way to handle this in terms of user experience?