Yep - in order for this solution to work, all of the calls need access to the same mutex; they all need to be in the same process (this is noted toward the end).
If you can do that, just share an "account" object. Calling account.balance+=50 doesn't require a mutex.