An earthquake of magnitude 4.2 and depth of 16.20 kilometers occurred 0.62 miles from Lafayette, CA in Contra Costa County at 04:40 AM.