My rule of thumb is that out-of-date medication is a lot better than no medication, and if it's only a little out of date and hasn't been exposed to unusual temperatures, I don't worry too much.
Dry tablets like co-codamol should be pretty stable if kept somewhere cool, dry and dark, unless it's a chemical that degrades over time at room temperature, like aspirin. The limiting factor may be how long they reckon the packaging will remain airtight. Liquids like antibiotic suspensions and injectable hormones and vaccines tend to have much shorter shelf lives - I'd consider expired insulin or adrenaline to be a last-resort option, as it's likely the dose will be unpredictable. And things like inhalers and auto-injectors will likely be further limited by the specifications of the delivery system, even if the drug itself has a long shelf life.
Here's an interesting paper where they tested some decades-old drugs found in the back of a pharmacy:
https://jamanetwork.com/journals/jamainternalmedicine/fullarticle/1377417Note that both codeine and paracetamol were close to the specified concentrations.
So for co-codamol, if the packaging's un-damaged and it hasn't been left on the windowsill, it's probably fine. By which I mean you should of course hand it in to your local pharmacy and obtain a new prescription