Let $A$ be a (commutative) monoid. Let $M$ be a right $A$-set and let $N$ be a left $A$-set. Then we can construct the tensor product $M \otimes_A N$, which is a set (of even $A$-set when $A$ is commutative) constructed from $M \times N$ by modding out the equivalence relation $\sim$ generated by $(ma,n) \sim (m,an)$. Thus, every element of $M \otimes_A N$ has the form $m \otimes n := [(m,n)]$.
Question. Is there an easy criterion how to decide $m \otimes n = m' \otimes n'$?
In other words, how to describe $\sim$ explicitly? It is easy when $A$ is a group, but I'm interested in more general (commutative) monoids.