OK i found A way in
Find the foreign keys
SELECT CONSTRAINT_NAME FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE WHERE REFERENCED_TABLE_SCHEMA = 'YOURDATABASENAME'
This will give you the key of the foreign key to delete.
Then remove the keys
ALTER TABLE oc_persistent_locks DROP FOREIGN KEY FK_foreignkey
Then run your upgrade and it should be Good