Your friend obviously has the right to express their annoyance at something, but an out-of-date, non-perishable (assuming it was in powder form) item given through a genuine mistake isn't the end of the world. Your apology should have been enough, especially after 40 plus years of friendship.
You say 'sell by date'. It's usually a 'best before' date or 'use by' date now. If it's 'best before' and within a few months, it should be fine. If it was a 'use by' date, then it isn't deemed safe to use.
My personal belief is her reaction is a little harsh. However, you say she can be judgemental and difficult, so maybe her reaction shouldn't have been entirely unexpected.
I would suggest writing an email (if that's how you can communicate) asking for clarification on the date, and what type it is (best before v use by), and reiterate the fact it was a genuine mistake and you would never wish her any harm.
I hope you can resolve this and stay friends. I have a mate who has been my pal for nearly 40 years and I'm almost certain he would accept it as a genuine mistake. And most likely rib me about it.
Just to add, I'm not suggesting your friend should try drinking the chocolate, I'm just saying I think she could have reacted in a less confrontational manner.