Equation of a torus

Implicit form

Add two more conditions to express the planes of your circles. Make sure your other equations are 3d as well. Then use e.g. resultants to eliminate $M_1$ and obtain a single implicit description of that torus.

For example, suppose $D(d,e,f)$ is the direction of the symmetry axis of the torus. Then your conditions can be written as

\begin{align*} \langle M_1-P_C,D\rangle &= 0 & (x_1-a)d+(y_1-b)e+(z_1-c)f &= 0 \\ \lVert M_1-P_C\rVert &= R & (x_1-a)^2 + (y_1-b)^2+(z_1-c)^2 &= R^2 \\ \langle M_2-M_1, (M_1-P_C)\times D\rangle &= 0 & (x_2-x_1)((c-z_1)e-(b-y_1)f)+\cdots&=0 \\ \lVert M_2-M_1\rVert &= r & (x_2-x_1)^2+(y_2-y_1)^2+(z_2-z_1)^2 &= r^2 \end{align*}

Now you combine these three expressions, and in the process eliminate $x_1,y_1,z_1$. At least theoretically. Naively doing this using a resultant computation in sage takes longer than I'm willing to wait just now. Particularly since Wikipedia already has the quadric equation for a specific position, so all you have to do is apply translation and rotation to their formula. The default position is given as

$$(x^2+y^2+z^2 + R^2 - r^2)^2 = 4R^2(x^2+y^2)$$

Parametric form

For parametric, simply combine parametric descriptions of two circles. Start with $(r\cos\varphi,r\sin\varphi)$ then turn that into 3d, move it to the correct location and use $M_1$ as the center of the second circle.