How long is a piece of string ?
The Tyre Industry suggests that a tyre should be withdrawn after 5 years irrespective of use or non use. The stated main reason is gradual tyre (compound) degradation due UV exposure. How extreme long storage under roof might affect the tyre as well, the Industry would be best to answer.
I personally would not rely on a Tyre which was in storage for 5 years and neither would I buy a tyre which is 5 years old in brand new condition.