Fix update.php failing with MySQL

MySQL doesn't support the DELETE syntax introduced in commit 15ffa09.
This fixes #298.