Oops, sorry Geoff! As it happens, if I'd got back from the pub a half-hour later, you'd have beaten me. I'd actually intended to post about 4 hours earlier (which is when I posted my version to the YT playlist); but when I did get home, I discovered my Seasons' post still sitting there in preview waiting for me to 'Submit Reply'!
From what I understand, a 'lock' hospital was an institution for treating venereal diseases (I use 'treat' advisedly); so-called because they evolved out of the old lazar (leper) hospitals as leprosy rates declined
http://ezitis.myzen.co.uk/londonlockharrow.html. So the lock hospital of your song could have been anywhere (in the British Empire of the time: 1864 saw a directive
establishing lock hospitals in garrison towns throughout the British Empire). If you google 'lock hospital', Google autocomplete suggestions include London, Aldershot (natch!), Glasgow, Manchester, Bristol, Dublin - and of course, Liverpool.
Covent Garden actually
is in Westminster, btw - as was the London Lock Hospital.
Just to add to the mystery, there was the old leper hospital in London attached to the monastery of St James the Less, long closed by the time of the Unfortunate Rake or The Buck's Elegy (Henry VIII used the land it had occupied for the site of his new St James' Palace); though whether there was a folk-memory that then gave rise to the association of St James with lock hospitals is a matter of speculation.
As to Louis Armstrong, his 1928 recording (with his Savoy Ballroom Five) was only the first or second known version that uses a minor key for the melody. Where this melody originated forms yet another part of the mystery.