This is probably a dumb question as I'm sure you have tried already: Have you tried deleting the lower ID instead?
Run in the below order . This is because of dependencies between tables.
delete from VPX_DS_ASSIGNMENT where DS_ID=31289;
delete from VPX_VM_DS_SPACE where DS_ID=31289;
delete from VPX_DATASTORE where ID=31289;
delete from VPX_ENTITY where ID=31289;