There should be 1 point in the system that said "user x has ordered item a". That then becomes an event.
The command from user x and y to order item a might be a race condition to see which command gets processed first, but once it has been turned into an event it's immutable and without race conditions. You should never replay commands.