This should only be an issue if a user is making an order then immediately makes another order on the site. In general the way to get around this is to kill off the session and start up a new one. I have done some searching and can see that there could be a few ways of doing this. Here is a link to an example that I found for doing this exact thing. If you use this code in the example on your checkout success and failure pages it should ensure that a new order is created in the db every time.