If you’re on the 3 hour mini pill you lose protection by taking it over 3 hours late.
If you’re on a 12 hour mini pill or combined pill you’re fine, as 5 hours isn’t classified as missed for those.
Check your pamphlet, the missed pill section has instructions tailored to the pill you’re taking and has exact instructions on how to proceed.