UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'f/DBPEPOkkMZC6S8oGMkIo6SW0+wnub3Q1D5nyMXShU='
WHERE
key_id = '3967e5e1833ab26330bc69feeed5fe52ea290f62b712ba3bd482ef83b458cc56'
AND (
token = 'f/DBPEPOkkMZC6S8oGMkIo6SW0+wnub3Q1D5nyMXShU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)