Hi and Welcome. My Name is ***** ***** I look forward to assisting you today with your question.
Some HP printers even if the ink has expired allow to override the message and allow you to print. Some models doesn't allow you to override and some ink won't expire at all. If your printer is not allowing you to override that message and not allowing you to print, then you have to replace the cartridges. That is your only option.
The ink expiration date depend up on many factors like printer warranty period, number of prints, ink installation date etc. The date printed on the cartridge is not ink expiration date but it is the warranty date.
You can find more information in here --> http://support.hp.com/us-en/document/c01764161
It is better to replace the cartridge to prevent further damages to the head of printer.
If you have any questions or would like any additional information, please don't hesitate to ask.