UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'XW7KOwl0NJP8xtC+rk/uQV89+F+HSyo711Z6mTsoF98='
WHERE
key_id = '8b448df5d62213ffbd4b37a16716c34adb106042e702b39f73abb8ff75b6bb11'
AND (
token = 'XW7KOwl0NJP8xtC+rk/uQV89+F+HSyo711Z6mTsoF98='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)