As for what it was use to lockup I couldn’t say, maybe anything. It is a unusual barb lock in that it has a hex body and the key is a loop. That is two things I haven’t seen before, but then I am not an expert on this type of lock. Age will be tough to pin down as that type of lock has been made I think for 400-600 years maybe longer but the metal type and construction would suggest that it is made in the last 100-250 years. Value could be hard to pin down and I will leave that to others.