I have a table like the following:
transaction_id
user_id
other_user_id
trans_type
amount
This table is used to maintain the account transa
Are you using InnoDB tables or MyISAM tables? MySQL doesn't support transactions on MyISAM tables (but it won't give you an error if you try to use them). Also, make sure your transaction isolation level is set appropriately, it should be SERIALIZABLE which is not the default for MySQL.
This article has a good example that explains the impact of the different isolation levels using an example very similar to yours.