I struggle to see how any judge would side with someone who knowingly took an out of date sandwich and had food poisoning. And even if they did it wouldn't get through on appeal.
And besides, there are companies which donate waste food. None have been sued to my knowledge.