There are two kinds of invitation and they behave differently.
The shared link — the one you copy from the invitation dialog — does not expire. It works until you rotate it or switch it off.
An emailed invitation expires after 7 days. After that the student has to be invited again. An invitation that has already been accepted cannot be used a second time by somebody else.
A student who opens a dead link of either kind sees only Invalid invitation link. The page cannot tell them which of the reasons applies, so it is worth saying in your message that a link has been replaced.