The licence is valid for 5 years; any Rating contained in the Licence is valid in accordance with that specific Rating.
Regarding the IR, it's slightly more complex. But basically:
Don't let the IR lapse by 5 years (from the expiry of your last military IR) or you'll have to sit another one with a CAA Examiner.
Really don't let the IR lapse by 7 years or more or you'll have to take all the lovely exams.
Once you've opened an ATPL, if you wish to have it reissued at the 5 year point all you need is a valid medical and a valid Type or Class Rating - I had mine reissued with just a SEP Class Rating, FI and IMC....
Normally you will get your licence and then go looking for a job. Certain airlines may wish you to have a current IR when you apply - but not all. When you do your airline Type Rating, it will include the requirements for an IR in any case.