UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'tMliB63+ZAgm5t3kBFw4QldgoG0NGa5j78F6gFctAHs='
WHERE
key_id = '969eb9c5f6533ea8ff36db3c3fcd97b6f48e998a2bf4676f9066f6bb21d51cc3'
AND (
token = 'tMliB63+ZAgm5t3kBFw4QldgoG0NGa5j78F6gFctAHs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)