UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FIui/Z2lwnDOY1fgxYYYF4+oo2o03Uf+Fr9u5hi3rc4='
WHERE
key_id = '64fe683f059fd3b59558e0ff1b006c1d957f168e0c61b6882d4288ae9f59e429'
AND (
token = 'FIui/Z2lwnDOY1fgxYYYF4+oo2o03Uf+Fr9u5hi3rc4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)