Completed logic to pick the recipe with earliest expiry date