UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DevXeO/foTFdKy6Hic6FwmZ1QJ/ou/n0OnNVsv7ZUlc='
WHERE
key_id = 'eb9b70ce6dcc6800eeb9421da10ef3f7ed7921706bfba33d09f2cdbeb492117b'
AND (
token = 'DevXeO/foTFdKy6Hic6FwmZ1QJ/ou/n0OnNVsv7ZUlc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)