At first glance, one would probably say groceries can be considered lost items without simanim as groceries that one purchased from the store are going to look the same as the stuff in the store. As such, there would be no obligation to even attempt to find their owner and the finder could keep them.
This may not be exactly true, though, as the unique combination of groceries in the bag could potentially be a siman. This would probably depend on how unique the items in the bag are and possibly some other factors. I would encourage you to ask a rabbi if this seems like a potential siman (and you are in an area that is largely populated by Jews [see next point]).
Nonetheless, there is no obligation to return the lost items of non-Jews (S.A. C.M. 266:1). Additionally, one who finds a lost item in an area (in this case the supermarket) which is mostly populated by non-Jews, it is assumed that the owner will have given up hope of recovering the items (S.A. C.M. 259:3) and the finder may keep it.
So it seems that if you find another person's grocery bag in your car, if the bag contains pretty normal stuff or if you are in a typical supermarket outside of Israel which is patronized mostly by non-Jews, you can assume that the original purchaser of the groceries has given up hope of recovering them and you may keep them yourself. On the other hand, if you are in a supermarket which is mostly patronized by Jews (e.g. many kosher supermarkets even outside Israel), you should probably ask a rabbi if the contents of the bag are unique enough to be considered a siman.
In general, there is no maximum length of time you are required to guard lost items with a siman. For easily replaceable items, you can sell them or note their value (by going back to the supermarket to check on their price) and use them (S.A. C.M. 267:24). If the owner ever comes back and provides the siman, you would repay them the value.