You can edit the expiration date during or after you added a product to your stock.
Here is how you can update it for stock that was already added:
From Inventory -> Products -> Stock you can locate the specific product that you need to update stock for:
Don't forget to Save the order.
FAQ:
Q: Can I change the COGS (cost) of the product stock item after I started using it?
A: No, once stock item is used (sold) at least once, you can no longer change its cost.