UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2+DQ9uSfdkqpTtfOK47Cq+fGjt55BMuIkjMMp29/mjg='
WHERE
key_id = '8894ea332416189b7adc5a0dc7d50b0aa868078db0fd26bcf5d7186ffd0f3165'
AND (
token = '2+DQ9uSfdkqpTtfOK47Cq+fGjt55BMuIkjMMp29/mjg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)