You have to remember a little farther back. Russia and Iran have been pretty well tied together at least since WW II. It was then that we (US) helped modernize the N/S railroad thru Iran to supply Russia thru the back door-—Aluminum, Studebaker trucks, etc. To this day that rail line is a major supply route for central Russia. The notion that the two aren’t going to get along well enough to keep the road open is a non-starter. As long as Iran can afford to pay, Putin will sell them weapons, typewriters, or whatever they need.
You say that as if they must sell them. The sales have been in abeyance for some time. That means Putin can control himself. He doesn’t have to sell the missiles. It’s not like Russia will die if it doesn’t sell the mad mullahs missiles. I know some think it’s his Christian duty to do so, but I don’t.