This isn't really "unlocking", if I understand your situation correctly. It seems that you're mounting USB drives to use, and when you try to unmount them, you're getting an error?
If this is the case, then there are a few possible reasons. If the USB drive is still in use, it won't unmount. This could even just be a program that has a file open on that drive, a terminal that is looking into that drive, or sitting in that drive (so to speak). or some other process is accessing it.
This also happens if you're transfering files back and forth and the system hasn't completed the transfer yet (even if it says it has). Just because that little Copying progress bar has gone away, doesn't mean that the system has truly finished transferring data. Wait a few minutes and try again.
Another thing that can cause this is if you manually mounted the USB drive and are trying to use another program to unmount it. Try manually unmounting it in a terminal.
On the other hand, I use Ubuntu and frequently get this message and sometimes it stays even after the device HAS unmounted. The way I know the device has unmounted (in spite of the message) is that the icon on the desktop or in the file browser is gone. If that's the case, then I've been save pulling the USB device.
BTW, what desktop environment/distro are you using that gives you ...
little green icon at the right bottom of the screen
Windows is the only one I know of that does that. If you're using windows, then some of the above still applies. The same issues/events will cause this problem in windows, but the fix is different, and it really should be addressed in another forum/website.