Thanks for your question.
downloadURL lasts for about an hour. If you want to know the exact expiration of the URL, you can look at the e= query parameter in the downloadURL itself. It's a UNIX epoch date in seconds. So in JavaScript, you could see the human readable date by creating a Date object with that numeric value. For example, const exp = new Date(TheEValue). However, this is an implementation detail that you cannot rely on and I would not suggest you take that approach.
There is no way to adjust the time-to-live of the URL. If you want something longer lasting, you'll have to provide a solution yourself. If you'd prefer not to do that, then you'll have to gracefully handle any errors as a result of accessing that URL.