You can sell the item at full value if you haven't left the store.
I don't think it's a good idea to make a timer after which the item loses its value. Because the shops are near the lines. You can run up to the store, buy an item, kill the hero and come back and sell the item for the full price.