The first security check that the OP mentioned is a customs check (it's written albeit tiny at the ceiling where the security checkpoint is located). I have no idea what the purpose of that checkpoint for other than spending another 5 minutes in line.
The second one at the gate (assuming you are on an international flight) is the "real" security check - liquids, laptops etc.