I bought several keys and try to apply them to herblore. It redeems them but doesn't apply the xp to the actual skill. The skill icon usually shows at the top of the screen when it does it correctly and it hasn't been showing up or redeeming so I lose the xp.
The exp that you think doesn't redeem is actually redeemed, but it doesn't get added to the skill immediately - it's called "bonus exp", and it's awarded on top of your regular exp gains when you train the skill normally.
"These ghastly beasts CAN be slain! They CAN be overcome!" -Borch Three Jackdaws
You never "lose" xp you gained from xp items, regardless they are from TH or somewhere else in the game.
There are two kinds of xp items - lamps and stars. Lamps grant you xp immediately but stars give bonus xp to skill(s).
Your bonus xp will never get lost even if you the laziest kind of players who never play the game because there are other forms of lamps (e.g. Smouldering Lmaps) that automatically convert bonus xp to actual xp. There are also NPCs that come to the game sometimes to allow you to convert bonus xp to other forms of goodies, including but not limited to actual xp, useful items and cosmetics.