UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+YoaQ5JZATlziyTTjhIsvftS55RaroMigVJRUuxkSG8='
WHERE
key_id = '984927a6f6f30cddfb66ccbc83d0ede2f802d1fb2c67d9a1552fe3a0c25fff75'
AND (
token = '+YoaQ5JZATlziyTTjhIsvftS55RaroMigVJRUuxkSG8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)