UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4ggoCZD72CWpxV4FNawwqsQs3kT6r6+ZrELiWvL6o9Q='
WHERE
key_id = '55f71d906fabcf3496c5ba379145ed87afd757a6816eb8ff9869c8f7fcb80b59'
AND (
token = '4ggoCZD72CWpxV4FNawwqsQs3kT6r6+ZrELiWvL6o9Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)