Its happened to me when I was drunk and in a hurry, also when I have had problems with the machine breaking and not giving me the money (slot thing didn't open).
Actually try it with a £10 or if you can find a machine which does £5 one of them.
KaHn
This only happens after a small amount of time not taking the money, You couldnt just go back to machine days later and try feeding the money into it, it wouldnt take it and also how would it know who's account it has come from?
I would just keep it, Probably fate, or if you do feel that bad give it to charity or someting.
This one. He's saved you so much hassle.give the £40 to they guy who emailed you about your wallet?
WTF, the machine would have swallowed the money back, but you decided to take it instead?
That's my new thing learnt for today, I was previously unaware machines did this