This is what I would typically do under such circumstances:
Force/quit the window or, if the system was completely locked, then power it off with the power button.
Get back to the desktop (hopefully unproblematically) and open a terminal and issue the following:
sudo apt-get remove caja-dropbox
sudo apt-get purge caja-dropbox
sudo apt-get autoremove
sudo apt-get install -f
sudo apt-get update
sudo apt-get install caja-dropbox