Just to add to what
ffay005 said - there are actually exits at either end of the terminal. Sorry about the quality of the map, but the lounges are in the middle of the terminal area (marked L in red), one is for biz and one for *G. I think that the one on the left as you look at the map, towards the A/B gates, is *G, so if you're in business then you'll be in the right hand lounge, so easier to head to the F/G gates on the right. Go straight, head down the escalator at the end (green arrow) and on the way down the escalator look out for big yellow EXIT signs, like eight feet tall [I can't remember if they're on the north or south side of the escalator on each end of the terminal, so marked on both]. Follow the sign, the staff may ask where you've come from and check where you're going (just say to Istanbul) and they'll let you go to immigration.
And if you get lucky with lockers, you can leave your carry-ons in the lounge while you go on the tour. The keypads on the lockers don't work as shown on the sticker, there is something else you have to do, but I can't actually remember sitting here, maybe it's an extra * or # after keying in your code. Anyway, a few lockers will be broken but most of them aren't, if they don't seem to work it's because there is something else you need to do to them... maybe another regular can remember and post...