UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ttaKYtM8eI/HIMTFPvVTgiVkdSiTciut0JeI7Hdn7t4=' 
WHERE 
  key_id = 'ed0d0ca43eee5bcbdc1260c076850ef1f3bd97b76228e69eba0829959a385437' 
  AND (
    token = 'ttaKYtM8eI/HIMTFPvVTgiVkdSiTciut0JeI7Hdn7t4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00167