The QR code itself doesn't expire, but the resource token does expire after 15 minutes from the payment creation. The resource token forms a part of the Hosted Payment Pages URL, and therefore the QR code too.
More
Check out our official documentation to know more about the QR code and Hosted Payment Pages.