UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'xVZKja/b2recOIfVUCk9AKnhWWFuoccnTppmrM5QaLY='
WHERE
key_id = '91b96428bdad834f9843b75d836cc16cdad081a54f6ada1d6b80f8ccd308739c'
AND (
token = 'xVZKja/b2recOIfVUCk9AKnhWWFuoccnTppmrM5QaLY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)