Pedantic point (to start with): there's no such thing as "UK law" in this context, there are 3 legal systems, those of Scotland, England and Wales, and Northern Ireland. For contract law they aren't very different in their practical outcome, but I practice in England and Wales, so I'll give you an answer from my own perspective.
So lets do a detailed analysis.
First you have what is called a "gratuitous loan" - you don't get anything out of it, but he has an obligation to pay you back. English law has never been very good at giving a theoretical analysis of gratuitous loans, but its clear what the effect is, namely you have an enforceable right to the return of your money.
Now we come to the contract in question. The only real trouble I have with the wording "as payment towards an outstanding debt" is that it doesn't say how much of the debt the payment is towards (the whole, or just a part?). But lets assume that its obvious from context (as you say) that that is what is meant.
You are worried about the rule in English law that past consideration is no consideration (Dent v Bennett (1839) 4 My & Cr 269).
That does not seem to be a problem. You appear to have given up a right against your friend (the right to sue for debt - what is technically known as a "chose in action") *in return* for which he transfered the ownership of some goods to you. Each of you got something from the other, so good consideration was given.
The situation would have been different if (for example) you had *given* him money freely in the past and alter he contracted to transfer goods to you. The consideration would there be past.