UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GPvJmzw+WvI82Y1ePFh/WHCCA9uZFy9Mv9qik7vYegY='
WHERE
key_id = '64b44c55d2c55dc8e3ef224b2cd2c86574a647ff4850a988815f4797d84dab11'
AND (
token = 'GPvJmzw+WvI82Y1ePFh/WHCCA9uZFy9Mv9qik7vYegY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)