With the fuel cap cover open and the key in the lock, does the mechanism operate between the lock and unlock positions? If so, then look at the keep area to see what is impeding its ability to lock.
If you still cannot see what is causing the problem or feel unable to perform a fix, see post #2 from 'kenp1'.
I had this issue once, with some other glitches on the car. Turns out it was the battery that was dying and indeed had a "sudden death" few days later. Give it a check.
A forum community dedicated to Kia owners and enthusiasts. Come join the discussion about performance, modifications, troubleshooting, maintenance, and more!