Sounds like maybe you're dealing with short-term memory loss. You're forgetting things that happen in the last few minutes (or hours), while your memory about events that happened longer ago seem intact.
Short-term memory loss is something a lot of us struggle with, one of those issues that we talk about when we talk about "cognititive difficulties". You'll see us talking about making lists...then forgetting where we keep the lists. Going to the store for just two items, and not remembering both of them. Driving along, and forgetting where we're going.
It is part of a flare...but sometimes also a residual thing, or one of those symptoms that doesn't go away, completely. Like everything else with MS, it's impossible to predict what will happen in your case.
But now that you're aware of it, you can help yourself by paying careful attention to things happening around you, especially when it's important stuff like the keys, or things at work that you need to deal with, -- the careful attention will help cement it better in your memory. And try to pay attention to just one thing at a time. Many of us can no longer "multi-task", but do fine if we do THIS thing..then that, then something else...just not all 3 at once.
Talk with your doctor about it, if it gets particularly bad. There are some meds that help with it, if you choose to go that way.