set the item's user data (if you aren't using it) to the handle id or unit index of the first unit to pick it up (on pick up, set the user data, and only if the unit can pick it up in the first place). From there, when a unit picks it up, check if the unit can use it and make sure that the data stored in the item is either 0, the handle id, or the unit index of the unit.
Done, very easy =)