How about this:
If there are X prizes available, generate X random date/times within the duration of the competition. So for example:
2:03:08 p.m. on 8/27/08
4:11:58 p.m. on 9/1/08
etc.
These would be generated beforehand (though not necessarily known by you) and stored by the program. Then the winner of each prize would be the first person who buys a ticket after each "winning time."
The flaw with this would be that some times of day would be much busier than others, so somebody who knows the algorithm could possibly gain an advantage. With such a small number of prizes, though, it might not make much of a difference.