UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Cnacc2KId0351A9MSy+iGB/+tL1yOxAO3jADSu2bI5U='
WHERE
key_id = '93b42d906fc1e6e07306620d225b2181ba202ad0e7c43b92f2ca34423c3ffb85'
AND (
token = 'Cnacc2KId0351A9MSy+iGB/+tL1yOxAO3jADSu2bI5U='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)