UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'UeCtBt50EvmVFJr9IMKSy55whyRtmkCLOLMncv3BEzc='
WHERE
key_id = '5ddaebe9e9c5d3b78f475da494b833d066bce4deb8021e4c101f5a0d7ec2fb75'
AND (
token = 'UeCtBt50EvmVFJr9IMKSy55whyRtmkCLOLMncv3BEzc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)