I agree with benracer. I think instead of having the voucher records already, you should build them at the time of purchase. You could use php like
$voucher = md5(uniqid(rand(), true));
to get a unique sequence, for example.
You should, however, be able to lock a table before updating it...
$query = "LOCK TABLES Vouchers WRITE";
mysql_query($query);
$query = "UPDATE Vouchers SET status = 'sold' WHERE voucher_id = 3";
mysql_query($query);
$query = "UNLOCK TABLES";
mysql_query($query);