UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FNKKshsDeR3AmDJ/9WiBuIVvZ7w14uwqN7rkLIYCHQA='
WHERE
key_id = 'dd91751c252b735bc3c5140e00184dc102f604e9833b740d99f3c03f9586b8e6'
AND (
token = 'FNKKshsDeR3AmDJ/9WiBuIVvZ7w14uwqN7rkLIYCHQA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)