scan_apply function

Iterate over keys using SCAN