Probably. The second specific exemption to the requirement that people should not be treated differently on grounds of age relates to length-of-service requirements that mirror a similar requirement in a statutory benefit - as for example contractual redundancy schemes where service-related provision is more generous than under the statutory scheme. If in doubt, take advice.