UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'lGmatQ84Q8bx030IaF+fqP4kmenwkpKsDwjhOEMdhM0='
WHERE
key_id = '4c7adcebdc6f7ee3c0173c586ec0eacfde17c6c4ccbf2f65f3e3d9812089a486'
AND (
token = 'lGmatQ84Q8bx030IaF+fqP4kmenwkpKsDwjhOEMdhM0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)