Some years ago I was eating a peppermint sweet when my throat closed so that I couldn't breathe through my mouth, although if I shut my mouth I could get some air breathing through my nose. It didn't feel like the gag reflex, it didn't feel like something was stuck in my throat (the sweet was still in my mouth, and in fact I spat it out),just a sudden closure which lasted about a minute. It has happened several times since then, usually when eating something with a strong flavour, but always associated with eating and only small amounts. I've learnt not to panic but stay calm, try to breathe through my nose, and eventually after a minute or so it passes. The last attack occured when I was eating a tart with crumbly pastry, and suddenly my throat closed but this time I couldn't get air either through my nose or mouth; again I think I stayed reasonably calm as I'm confident it will pass, but the total absence of air this time worries me as I wonder if it could last for a few minutes. Even when the constriction eased and I could breathe, my throat felt tight for several minutes and it was difficult to speak.
I'm not sure if it is relevant but I have a peanut allergy and have had a life threatening anaphylaxis some years ago, so I carry an Epi-pen but have not considered using that in these circumstances.