I'm not a lawyer but my guess is requiring years of experience isn't discrimination since it would only help, not hurt, the protected class (older workers).
What you are not allowed do is discriminate based on criteria that are not part of essential qualifications for the job. And I for one can't conceive of one single thing that disqualifies, say, Jeff Dean, from holding that job over a candidate a few years his junior.