Patents last up to a maximum of 20 years in both the UK and in EU countries covered by the UPC. However this often requires ongoing renewals after an initial period (such as 5 years) and keeping up to date with the payment of fees to remain valid.
How long does a patent last?