Been there, done that

My policy is not to run both calibre and the Kobo desktop in the same session. And especially not at the same time. There is to much chance of one clobbering the changes made by the other or breaking the database.
The eject failing from calibre depends on what else is using the drive. If any application has a file on it open, then the operating system won't eject the device. I open the database an SQLite browser a lot and that prevents the eject. If I forget to close the browser before ejecting using calibre, I have to close the browser and eject using the OS.