How to unmount a locked volume?
I've found this solution that has worked reliably several times already today. 

The process that, in my case, was responsible for the failure of the ejection was:

SystemUIS (as seen in top in a terminal) which is in fact SystemUIServer.

Here is how to kill it without a terminal: run Activity Monitor, find SystemUIServer (type UI in the top right search field), and stop it with the top left button (stop button).