```solidity
// SPDXLicenseIdentifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
contract BlindBox is ERC721, Ownable {
using Counters for Counters.Counter;
Counters.Counter private _tokenIds;
mapping(uint256 => string) private _tokenURIs;
event TokenURIUpdated(uint256 indexed tokenId, string tokenURI);
constructor(string memory name, string memory symbol) ERC721(name, symbol) {}
function mint(address to, string memory tokenURI) external onlyOwner returns (uint256) {
_tokenIds.increment();
uint256 newTokenId = _tokenIds.current();
_mint(to, newTokenId);
_setTokenURI(newTokenId, tokenURI);
return newTokenId;
}
function _setTokenURI(uint256 tokenId, string memory tokenURI) internal {
require(_exists(tokenId), "ERC721Metadata: URI set of nonexistent token");
_tokenURIs[tokenId] = tokenURI;
emit TokenURIUpdated(tokenId, tokenURI);
}
function tokenURI(uint256 tokenId) public view override returns (string memory) {
require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
string memory uri = _tokenURIs[tokenId];
return uri;
}
function updateTokenURI(uint256 tokenId, string memory newTokenURI) external onlyOwner {
_setTokenURI(tokenId, newTokenURI);
}
}
```