One example is that $\cdot$ is ordinary multiplication of integers and $x*y=(x\cdot y) \bmod b.$ One could as well let $\cdot$ be ordinary addition. That is essentially your example except that you are not requiring $b$ to be a positive integer.
More generally, Let $\sim$ be an equivalence relation on $S$ and $\cdot$ a compatible associative operation in that $x \cdot y \sim x' \cdot y'$ provided that $x \sim x'$ and $y \sim y'.$ Pick a system of class representatives. Then $x \sim y$ exactly if $[x]=[y]$ and compatibility condition is
$[x\cdot y]=[[x] \cdot [y]]$ for all $x,y.$
Then defining $x*y=[x \cdot y]$ satisfies your requirement since $$x*(y\cdot z)=[x\cdot (y \cdot z)]=[x \cdot (y*z)]=x*(y*z). $$ The middle step since $x \sim x$ and $y \cdot z \sim y*z.$
Moreover $x*y*z=x*(y\cdot z)=(x \cdot y) *z.$ You just have to do $*$ last.
It might be that all examples are like this (but it isn't, see below). Given $*$ and $\cdot$ meeting your condition, define $v \sim w$ to mean that $x*v=x*w$ for all $x.$ This is clearly an equivalence relation and $y\cdot z \sim y*z$ for all $y,z$.
It is not clear that $\cdot$ must be compatible , but it is provided $\cdot$ has a left identity $u$ with $u\cdot v=v$ for all $v.$ Then we can define class representatives by $[x]=u*x $ and we have
$$ [x \cdot y]=u*(x \cdot y)=u*((u \cdot x) \cdot (u \cdot y))=u*(u \cdot x) * (u \cdot y)=u*(u * x) * (u * y) $$ And, $$[[x] \cdot[y]]=u*((u*x)\cdot (u*y))= u*((u*x)* (u*y)).$$
NOTES Having $\sim$ be equality gives the example of $*=\cdot.$ The example in the comments of $x*y=a$ for some constant $a$ is the case that everything in $S$ is equivalent to everything else. I suppose also the case that $x*y=x$ gives the case that everything in $S$ is equivalent to everything else. However here it is not the case that $x*y$ can be described in term of $x\cdot y$