UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rt4Ji/XiO7Tjx/ZhFdDphA02mgnQOslezAuWG/oVlxk='
WHERE
key_id = '1e71826b93c52dbea9ecbb69042bafd649acae52a3190aff76afc30cb9ce676c'
AND (
token = 'rt4Ji/XiO7Tjx/ZhFdDphA02mgnQOslezAuWG/oVlxk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)