Euler's theorem tells you that for $n$ and $a$ coprime, you have $$a^{\phi(n)} \equiv 1 \bmod n$$ where $\phi(n)$ is Euler's totient which counts the numbers less than $n$ and coprime to it.
So in this case we would know that $$23^{\phi(60)} = 23^{16} \equiv 1 \bmod 60$$ so we can say that $$x\equiv 23^{15} \bmod 60 $$ gives us solutions.
There is also Carmichael's reduced totient function $\lambda$ which often gives a smaller exponent for the same purpose. In this case $\lambda(60) = 4$ and so we can use $x\equiv 23^{\lambda(60)-1}\equiv 23^3 \equiv 47 \bmod 60$.
Now this gives your value, since $107\equiv 47\bmod 60$, and is one of the possible choice of the integers $47+60k$ which obey the equivalence.
For a rapid method not using exponents, the extended Euclidean algorithm will both check that $a$ and $n$ are coprime and deliver the modular inverse of $a\bmod m$ (which is what your equation here is asking for, $ax\equiv 1 \bmod n$). Note that solving this also helps to solve other $\bmod n$ equations involving $a$.