UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4FEihnMcNkwQyakBI5fQu7Xq0j70lp/KRtleTYff45A='
WHERE
key_id = '8be1c5861dddd4296e9d9d57d99414eed8bfc68c23c9b1bad583fc26ab15ffed'
AND (
token = '4FEihnMcNkwQyakBI5fQu7Xq0j70lp/KRtleTYff45A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)