If it has just expired, or it has only been a few weeks, it is probably OK.
The expiry dates are simply estimates, but if products were effective after the expiration date, there would be no point in recommending a date. A few weeks or months past should be fine, but 5 years is a long time.
Expiry dates are usually a guarantee of potency, so expired whey protein might not cause you any harm, but it won't be as potent.
Again, most expiry dates are estimated guidelines. Within a few weeks of the expiration date you should be fine, but after 5 years the potency might be way down.