First off, I would try to talk my friend out of it with things like
- They're looking specifically for someone with 10 years, and you've only got 5
- They're really interested in someone who has a lot of experience working with clients, and I thought you didn't work with clients at all
- They are very focused on meeting tight deadlines, and you'd be held accountable for all missed deadlines
Even if I fail talking him/her out of it, I've at least given him/her the impression that they are not exactly what the company is looking for.
Second, I'd tell my friend up front that I will be honest if asked about him/her. I'd definitely promote my friend's good points, however I would probably be asked questions related to some of their shortcomings as well (such as experience at client interactions, working under pressure, meeting deadlines, etc), and I would be honest with the company about them.
With that information in mind, I would encourage my friend to apply if they still wanted to, and it would be up to them if they wanted to let the company know that they know me or not.
If they choose not to mention me, that's fine. The interview and hiring process would be the same as if a stranger applied.
If they did mention me, I'd be honest with the company and be happy knowing that my friend already knows in advance what I'd be telling them (both good and bad).
Oh, and I'd also make it clear to my friend that the final decision to hire is up to someone else, so they don't blame me if they don't get the job :)