Despite what they’re telling you here, don’t change/touch your links. You don’t want someone else earning a commission from work only you have done.
Now to answer your question.
The 24hr cookies period you hear about applies only to the person who clicked on your link.
If they purchase an item within 24hrs of clicking your link, you get a commission.
If they don’t, you earn nothing. This applies to only that individual. If someone else clicks on your link and makes a purchase within 24hr of them clicking, you earn a commission.
The point here is. The cookie lasts for as long as an individual clicks on it. Not everyone else who will come after him.
Oh and if they return another time, click on your link and make a purchase within 24hrs? You earn a commission.
Fear not and continue doing work on your site.