UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'jsGiVG7ClXnXCpPN7VQ5+0MWvW0aCCoR4foL39t1BKE=' 
WHERE 
  key_id = '7e3d65117f521f369ffce76cfd3fe436b389bb6256e075945ae9dbe0cf911a55' 
  AND (
    token = 'jsGiVG7ClXnXCpPN7VQ5+0MWvW0aCCoR4foL39t1BKE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00055