It is not an uncommon problem according to the results of a Google search. One fix recommended by Toshiba for their drives is to disconnect the data cable, boot the PC, switch off and then reconnect the data cable before booting again. This apparently resets the drive.
In fact if you disconnect the data cable and the unit still opens and closes on its own it points to an internal electrical or mechanical fault with the drive itself.