I am not sure how long between your transaction and your verification; but it certainly seems that your session cookie has expired. Sessions usually end after 45 minutes or so by default. This will free up more uniqid to use php and prevent potential session hijacking.
I'm not sure if you have a custom session handler and it is stored in the database, but guessing your posts and comments on this page, I would assume that it is stored in files on the server side.
Now the solution to your problem is to bite the bullet and save the necessary data in the database and access it through the session identifier, even if it means creating another table that will sit next to your order table.
If, however, you perform the action immediately, then another explanation is that the user either logged out or committed an action that destroyed their session (deleting the cookie on the server side).
You will see these cookies in the / tmp servers folder, try to find your cookie, it should be called "sess" + $ session_id.
source share