Fix update.php failing with MySQL

MySQL doesn't support the DELETE syntax introduced in commit 15ffa09.
This fixes #298.
Merge pull request #299 from seanrand/nested-subquery-fix

Fix update.php failing with MySQL (#298)