Your Sense of Smell: How Do The Recpetors "Recycle"?

In my very limited understanding, you are able to perceive smells because the molecules causing the smell fit into positions on the surface of receptor cells, much as a key fits into a lock. This in turn, generated a nerve impulse, which is sent to the brain.
My question: how long do the receptor cells keep the smell molecules locked in? How exactly are they discarded? Take the example of smelling something nastly (like decaying flesh)-you instinctively run away from such a smell. yet, the smell seems to stay with you for a long time-while the smell of a nice flower might last only seconds-why?