UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '7wFzqeHcdJaSohXZ50HwUKDKLo7bm6br3l2RBf/Ary0=' 
WHERE 
  key_id = '61e42ad4be6bf3f7041aafda2b4254e2e2b02335c3b2e13bc8439cce70c3c040' 
  AND (
    token = '7wFzqeHcdJaSohXZ50HwUKDKLo7bm6br3l2RBf/Ary0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033