This is exactly what is meant by quick thinking.
This incident happened during the match between Al Wasl v Al Ain in the United Arab Emirates.
Spanish striker Yeste who plays for Al Wasl took advantage of his opponents celebrating by scoring directly from the restart.
The goal however was not enough as Al Wasl went on to lose the match 3-2.
Check out the goal.