I have some question ... example: a user will buy something for his USD
First off, you have to use transactions, but that's not enough. In your transaction, you can use SELECT FOR UPDATE.
It's basically saying, "I'm going to update the records I'm selecting", so it's setting the same locks that an UPDATE would set. But remember this has to happen inside a transaction with autocommit turned off.