Actually "till 5PM" is far better here. If you use "can be picked up till 5PM", the "till 5PM" modifies "can be picked up" and so the whole sentence asserts that "the package can be picked up" remains true until 5PM. So there is nothing wrong with the first option. If you use "can be picked up by 5PM", the "by 5PM" modifies only "picked up" and so "The package can be picked up by 5PM." asserts that you can do anything you like as long as you pick up the package by 5PM, which is fine too.
But the second option is a bit odd because of the "and then we close". It would be far better to say:
The package should be picked up by 5PM as we close at that time.
In contrast, the "and then we close" is perfectly fine in the first option because there is a progression of events:
possibly the package is picked up → 5PM → we close.
Thank you for the links, but they don't provide an answer for my context.You need to start explaining your confusion and/or your perplexities. Do some research, put a minimal amount of effort and explain your confusion between "by" and "until". Until then, you're always going to get users either not upvoting or closing your questions. – Mari-Lou A Jan 08 '22 at 12:44