Iran can fire at the UK from southwestern Iran, which means the flight path will be over Iraq and Syria, but that isn't the issue here.
The issue is, what do you want to achieve by such a stupid move?
We're talking about almost 5,000 km. What can an IRBM with a small conventional warhead, falling hundreds of meters off the target, achieve at such a distance?
Israel is barely 1500 km away from Iran and we haven't been able to have an impact on the Israeli Air Force after firing over 200 missiles at their air bases. Now we want to try the same thing at 5,000 km? It makes no sense.