MySQL master to master race conditions, do I need to use transactions/locks for this code?
In short - yes, you will have to engineer your application in a way that makes it resistant to race conditions. Transactions won't help you with this.