Fix update.php failing with MySQL (#298)

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